package com.cd.service.guide.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cd.bean.Guide;
import com.cd.dao.GuideMapper;
import com.cd.service.guide.GuideService;

/**
 * 种养指导
 *@Author zhk
 *@Date 2018-1-2
 **/
@Service("guideService")
public class GuideServiceImpl implements GuideService{

	@Autowired
	GuideMapper guiddeMpper;

	@Override
	public void save(Guide guide) throws Exception {
		guiddeMpper.save(guide);
	}

	@Override
	public void delete(Integer id) throws Exception {
		guiddeMpper.delete(id);
	}

	@Override
	public void edit(Guide guide) throws Exception {
		guiddeMpper.update(guide);
	}

	@Override
	public List<Guide> listAll() throws Exception {
		// TODO Auto-generated method stub
		return guiddeMpper.queryByList();
	}

	@Override
	public Guide findById(Integer id) throws Exception {
		// TODO Auto-generated method stub
		return guiddeMpper.query(id);
	}

	@Override
	public void deleteAll() throws Exception {

	}

	@Override
	public Integer size() throws Exception {
		// TODO Auto-generated method stub
		return guiddeMpper.getCount();
	}

	@Override
	public List<Guide> listLimit() throws Exception {
		// TODO Auto-generated method stub
		return guiddeMpper.list();
	}
	
	
}
